Skip to content

agent: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/ver#1592

Open
sweetmantech wants to merge 2 commits intotestfrom
agent/-u0ajm7x8fbr-update-chat-to-th-1774075858898
Open

agent: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/ver#1592
sweetmantech wants to merge 2 commits intotestfrom
agent/-u0ajm7x8fbr-update-chat-to-th-1774075858898

Conversation

@sweetmantech
Copy link
Copy Markdown
Collaborator

@sweetmantech sweetmantech commented Mar 21, 2026

Automated PR from coding agent.

Prompt: @U0AJM7X8FBR Update chat to the latest streamdown https://github.com/vercel/streamdown

Summary by CodeRabbit

  • New Features

    • Rich content rendering added: code blocks, math notation, and mermaid diagrams now render in AI responses.
  • Chores

    • Expanded CSS scanning to include additional distribution files so external component styling is picked up.

Bumps streamdown to the latest version (2.5.0). Updates the Tailwind
@source glob from dist/index.js to dist/*.js to match the v2 dist layout.
No changes needed to response.tsx — the Streamdown import API is unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Mar 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
recoup-chat Ready Ready Preview Mar 24, 2026 10:50pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 21, 2026

📝 Walkthrough

Walkthrough

Added Streamdown plugin integration to the Response component (code, math, mermaid) and broadened Tailwind's content scan in app/globals.css to include Streamdown distribution files and scoped Streamdown packages via glob patterns.

Changes

Cohort / File(s) Summary
Tailwind content scan
app/globals.css
Replaced single-file Streamdown scan with glob patterns: streamdown/dist/*.js, and added scoped package paths: @streamdown/code/dist/*.js, @streamdown/math/dist/*.js, @streamdown/mermaid/dist/*.js.
Streamdown rendering
components/ai-elements/response.tsx
Imported code, math, mermaid plugins, assembled defaultPlugins, and passed them to Streamdown via plugins={defaultPlugins} to enable plugin-based transformations during rendering.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant Response_Component as Response
  participant Streamdown_Renderer as Streamdown
  participant Plugins as Plugins(code, math, mermaid)

  Client->>Response: request render
  Response->>Streamdown: call Streamdown.render(content, plugins)
  Streamdown->>Plugins: invoke transforms (code/math/mermaid)
  Plugins-->>Streamdown: transformed HTML/AST
  Streamdown-->>Response: rendered markup
  Response-->>Client: send rendered output
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A few plugins join the rendering song,
Tailwind widens its watch, scanning long,
Code, math, mermaid — now parsed with care,
Components harmonize; output's laid bare. ✨

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Solid & Clean Code ❓ Inconclusive Unable to access repository code due to persistent network connectivity errors preventing verification of implementation details, code structure, and SOLID principles adherence. Retry repository access when network connectivity is restored, or provide actual code contents of modified files for thorough evaluation.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/-u0ajm7x8fbr-update-chat-to-th-1774075858898

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c6a142eb7f

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

"sharp": "^0.34.2",
"sonner": "^2.0.7",
"streamdown": "^1.1.6",
"streamdown": "^2.5.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore Streamdown plugins before shipping v2

Any chat response that contains fenced code, Mermaid, or LaTeX will regress after this bump. Streamdown 2.x moved those capabilities behind optional plugins (@streamdown/code, @streamdown/mermaid, @streamdown/math, etc.; see the upstream README usage for plugins={{ ... }}), but our renderer still mounts bare <Streamdown {...props} /> in components/ai-elements/response.tsx:11-29 and there are no @streamdown/* imports anywhere in the repo. The previous lockfile entry for streamdown@1.6.10 bundled shiki, remark-math, and rehype-katex, so upgrading only the package version here silently drops syntax highlighting/copy UI and math rendering for existing responses.

Useful? React with 👍 / 👎.

Install and configure @streamdown/code, @streamdown/math, and @streamdown/mermaid
plugins to restore syntax highlighting, LaTeX math rendering, and Mermaid diagram
support after upgrading from streamdown v1 to v2.

Streamdown v2 moved these capabilities behind optional plugins. Without them,
fenced code blocks, math expressions, and Mermaid diagrams would regress silently.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/globals.css (1)

10-13: Correctly configured Tailwind v4 content scanning for Streamdown plugins.

The @source directives properly extend Tailwind's class detection to include the Streamdown plugin distribution files. This ensures any Tailwind classes used by these plugins are included in the final CSS bundle.

Regarding the Stylelint errors: these are false positives. The @source directive is valid Tailwind CSS v4 syntax, but Stylelint's scss/at-rule-no-unknown rule doesn't recognize it. Consider updating your Stylelint configuration to ignore Tailwind-specific at-rules:

💡 Stylelint configuration suggestion
{
  "rules": {
    "scss/at-rule-no-unknown": [
      true,
      {
        "ignoreAtRules": ["source", "plugin", "theme", "custom-variant", "utility", "tailwind", "apply", "layer"]
      }
    ]
  }
}

Or if using a .stylelintrc.js:

module.exports = {
  rules: {
    "scss/at-rule-no-unknown": [
      true,
      {
        ignoreAtRules: ["source", "plugin", "theme", "custom-variant", "utility", "tailwind", "apply", "layer"]
      }
    ]
  }
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/globals.css` around lines 10 - 13, Stylelint is flagging Tailwind v4's
`@source` directives (the lines starting with "@source
'../node_modules/streamdown...") as unknown at-rules; update your Stylelint
configuration (rule "scss/at-rule-no-unknown") to ignore Tailwind-specific
at-rules such as "source" (and optionally
"plugin","theme","custom-variant","utility","tailwind","apply","layer") so the
`@source` directives in globals.css are treated as valid by the linter.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@app/globals.css`:
- Around line 10-13: Stylelint is flagging Tailwind v4's `@source` directives (the
lines starting with "@source '../node_modules/streamdown...") as unknown
at-rules; update your Stylelint configuration (rule "scss/at-rule-no-unknown")
to ignore Tailwind-specific at-rules such as "source" (and optionally
"plugin","theme","custom-variant","utility","tailwind","apply","layer") so the
`@source` directives in globals.css are treated as valid by the linter.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: a15e5bec-1b5b-430c-b96b-e235b87c99ce

📥 Commits

Reviewing files that changed from the base of the PR and between c6a142e and b41f576.

⛔ Files ignored due to path filters (2)
  • package.json is excluded by none and included by none
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml and included by none
📒 Files selected for processing (2)
  • app/globals.css
  • components/ai-elements/response.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant